This section is intended to introduce various aspects of the art, which may be associated with aspects of the disclosed techniques and methodologies. A list of references is provided at the end of this section and may be referred to hereinafter. This discussion, including the references, is believed to assist in providing a framework to facilitate a better understanding of particular aspects of the disclosure. Accordingly, this section should be read in this light and not necessarily as admissions of prior art.
Reservoir simulators solve systems of equations describing the flow of oil, gas and water within subterranean formations. In a reservoir simulation model, the subterranean formation is mapped on to a two- or three-dimensional grid comprising a plurality of cells. Each cell has an associated equation set that describes the flow into the cell, the flow out of the cell, and the accumulation within the cell. For example, if the reservoir is divided into 1000 cells, there will be 1000 equation sets that need to be solved.
To model the time-varying nature of fluid flow in a hydrocarbon reservoir, the solution of the equations to be solved on the grid cells varies over time. In the reservoir simulator, solutions are determined at discrete times. The time interval between solutions is called the timestep. For example, the reservoir simulator may calculate the pressures and saturations occurring at the end of a month, so the timestep is a month and a single solution to the equation set is needed. To calculate the changes in pressure and saturation over a year, the simulator in this example calculates twelve monthly solutions. The time spent solving this problem is roughly twelve times the time spent solving the single month problem.
The size of the timestep that a simulator can take depends on a number of factors. One factor is the numerical method employed to find the solution. As some reservoir models may have thousands or millions of cells, various methods have been proposed to efficiently solve the large number of equations to be solved by a reservoir simulation model. One popular strategy for finding the solutions to these systems of equations is to use an iterative root-finding method. These methods find approximate solutions that get progressively closer to the true the true solution through iteration and solution updating. Newton's Method is one type of iterative root-finding method in general use. In Newton's Method, the set of simulation equations are cast into a form that makes the solution an exercise in finding the zeros of a function, i.e. finding x such that ƒ(x)=0.
FIG. 1 is a graph 8 that depicts Newton's Method for a single equation. Curve 10 is the function ƒ(x). What is sought is the value x where ƒ(x)=0, indicated by point 12. The initial guess is x0. The second guess is calculated by taking the line 14 tangent to ƒ(x) at x0 and applying the formula x1=x0−(ƒ(x0)/ƒ′(x0)). Here ƒ′(x) denotes the derivative of the function ƒ(x) and is the slope of the tangent line at x. The third guess, x2, uses the line 16 tangent at the second guess (x1) and applies the same formula, x2=x1−(ƒ(x1)/ƒ′(x1)). Continuing this iterative algorithm one can get very close to the root of ƒ(x), i.e., point 12, in a modest number of iterations.
Reservoir simulators have expanded Newton's Method to solve for the many thousands of equations at each timestep. Instead of one equation a system of equations is used:
                                                        f              1                        ⁡                          (                                                x                  1                                ,                …                ⁢                                                                  ,                                  x                  n                                            )                                =          0                ⁢                                  ⁢                                            f              2                        ⁡                          (                                                x                  1                                ,                …                ⁢                                                                  ,                                  x                  n                                            )                                =          0                ⁢                                  ⁢        ⋮        ⁢                                  ⁢                                            f              n                        ⁡                          (                                                x                  1                                ,                …                ⁢                                                                  ,                                  x                  n                                            )                                =          0                                    [                  Equation          ⁢                                          ⁢          1                ]            where f1(x1, . . . , xn)=0 are the reservoir simulation equations for grid block 1 containing the variables x1 through xn, and n is the number of grid cells. The variables, x1, . . . , xn, are typically pressures and saturations at each cell.
To apply Newton's method to this system of equations the tangent of the function is needed to use in the iterative method, like that described above for the single equation above. The tangent of this matrix A is called the Jacobian J and is composed of the derivatives of the functions with respect to the unknowns.
                    J        =                  [                                                                                          ∂                                          f                      1                                                                            ∂                                          x                      1                                                                                                  …                                                                                  ∂                                          f                      1                                                                            ∂                                          x                      n                                                                                                                          ⋮                                            ⋱                                            ⋮                                                                                                          ∂                                          f                      n                                                                            ∂                                          x                      1                                                                                                  …                                                                                  ∂                                          f                      n                                                                            ∂                                          x                      n                                                                                                    ]                                    [                  Equation          ⁢                                          ⁢          2                ]            
As in the case with one equation an initial guess {right arrow over (x)}0 is made, where {right arrow over (x)}0 is a vector of solutions. Each subsequent guess is formed in the same manner as that for a single variable, where {right arrow over (x)}i is formed from the previous guess {right arrow over (x)}i−1 using the following equation:{right arrow over (x)}i={right arrow over (x)}i−1−(f({right arrow over (x)}i−1)/J({right arrow over (x)}i−1))  [Equation 3]This equation can be rewritten asJ({right arrow over (x)}i−1)({right arrow over (x)}i−{right arrow over (x)}i−1)=−f({right arrow over (x)}i−1)  [Equation 4]which is a matrix equation of the form A{right arrow over (x)}={right arrow over (b)}. The solution is thought to be converged when either the term ({right arrow over (x)}i−{right arrow over (x)}i−1) or −f({right arrow over (x)}i) approaches zero, i.e. is below a small threshold, epsilon (ε). This idea is applied thousands or millions of times over hundreds of timesteps in a reservoir simulator.
FIG. 2 is a flowchart 20 showing the steps of Newton's Method for a system of equations. At block 21, a solution vector {right arrow over (x)}i, representing the solutions for the system of equations, is set to an initial guess {right arrow over (x)}0. At block 22 a Jacobian Matrix Ji and a vector {right arrow over (b)}i is constructed for all cells Zn, or equation sets associated with the cells, using the solution vector {right arrow over (x)}i. At block 23 a new solution estimate {right arrow over (x)}i1 is obtained for all cells Zn. At block 24 it is determined how many cells are unconverging, which may be defined as having associated equation sets that have not satisfied a convergence criterion. If the number of unconverging cells is zero, then at block 25 the method stops. However, if at block 26 it is determined that the number of unconverging cells is not zero, then at block 27 the solution guess vector {right arrow over (x)}i is set to the new solution estimate {right arrow over (x)}i1 and the process returns to block 22. The method repeats until no cells are unconverging. At that point the system of equations may be considered solved.
While the Newton's Method provides a simple way to iteratively solve for solutions to systems of equations, its effectiveness is lessened when the equations in a system of equations do not uniformly converge. For example, a two-dimensional grid 30 is shown in FIGS. 3A, 3B, 3C, and 3D as having 169 cells. Each cell has an equation or equation set associated therewith. Prior to any iteration (FIG. 3A) the 169 equations are used as inputs to Newton's Method. After one iteration of Newton's Method (FIG. 3B) the equations related to 111 cells have converged (shown by the lighter-colored cells 32). In other words, some areas of the reservoir have found solutions such that the term ({right arrow over (x)}i−{right arrow over (x)}i−1) is below ε for those areas. The unconverged cells are shown as darker colored cells 34. The second iteration (FIG. 3C) uses all 169 equations, and the equations related to 147 cells have converged thereafter (as indicated by reference number 36). After the third iteration (FIG. 3D)—which also uses all 169 equations—is completed, all equations have converged. This example highlights a drawback of Newton's Method: even though most equations have converged to a solution after a single iteration, Newton's Method uses the equations for all cells for all iterations. In other words, the size of the system of equations to be solved does not change after each iteration. For a large two- or three-dimensional reservoir simulation grid having thousands or millions of cells, the time and computational power required to perform Newton's Method repeatedly may be prohibitive.
Various attempts have been made to reduce the time required to solve a system of equations using Newton's Method. Examples of these attempts are found in the following: U.S. Pat. Nos. 6,662,146, 6,052,520, 7,526,418, and 6,230,101; U.S. Patent Application No. 2009/0055141; “Krylov-Secant Methods for Accelerating the Solution of Fully Implicit Formulations” (SPE Journal, Paper No. 00092863); “Adaptively-Localized-Continuation-Newton: Reservoir Simulation Nonlinear Solvers that Converge All the Time” (SPE Journal, Paper No. 119147); and “Preconditioned Newton Methods for Fully Coupled Reservoir and Surface Facility Models” (SPE Journal, Paper No. 00049001). While each of these proposed methods may reduce the time necessary to solve a system of equations, none of the methods reduce the number of equations (or cells) required to be solved using Newton's Method. What is needed is a way to reduce the number of equations needed to be solved in successive iterations of an iterative solver such as Newton's Method.